package com.ywh.composetest

import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.unit.Dp

@Composable
fun Dp.toFloatPx() = LocalDensity.current.density * this.value

@Composable
fun Dp.toIntPx() = toFloatPx().toInt()